
#include "para_pars.h"

static int rkmpp_player_help(void)
{
	log_n("******************************************************\n");
	log_n("Usage: rkmpp_player\n");
	log_n("argv[0]: set hdmi   video is show\n");
	log_n("argv[1]: set system volume\n");
	log_n("argv[2]: set video  decode time\n");
	log_n("argv[3]: set video  play index\n");

	
	log_n("******************************************************\n");

	return 0;
}


int parameter_parsing(int argc, char *argv[])
{
	int i = 0;
	int j = 0;

	char volume     = 0;
	char v_is_show  = 0;
	int  de_time    = 0;
	int  play_index = 0;
	//****************************************************
	log_n("******************************************************\n");
	log_n("argc=%d\n",argc);
	//****************************************************
	for(i=0;i<argc;i++)
	{
		log_n("argv[%d]=%s\n",i,argv[i]);

		switch(i){
		case CONFIG_PARA_VIDEO_SHOW:
		{
			v_is_show = atoi(argv[i]);
			video_para_set_is_show(v_is_show);
			log_n("v_is_show=%d\n",v_is_show);
			break;
		}
		case CONFIG_PARA_VIDEO_PATH:
		{
			char video_path	= 0;
			video_path = atoi(argv[i]);

			log_n("video_path=%d\n",video_path);

			switch(video_path){
			case 0:
			{
				video_para_set_path("/home/video/");
				break;
			}
			case 1:
			{
				video_para_set_path("/media/root/harddisk/");
				break;
			}
			default:break;
			}

			break;
		}
		case CONFIG_PARA_VOLUME:
		{
			volume = atoi(argv[i]);
			audio_para_set_volume(volume);
			log_n("volume=%d\n",volume);
			break;
		}
		case CONFIG_PARA_VIDEO_DETIME:
		{

			break;
		}
		case CONFIG_PARA_VIDEO_INDEX:
		{

			break;
		}
		default:break;
		}
	}
	//****************************************************
	rkmpp_player_help();
	//****************************************************
	
	system_para_config();
	//****************************************************

	

	return 0;
}









